import java.util.Scanner;

public class Test {
    public static int find(int[] arr){
        int r = arr[0];
        for (int i = 1; i < arr.length; i++) {
            r ^= arr[i];
        }
        return r;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] arr = {4,1,2,1,2};
        int rec = find(arr);
        System.out.println(rec);
    }
}
